package com.coin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.coin.domain.Account;
import com.coin.vo.UserTotalAccountVo;

import java.math.BigDecimal;

/**
 * @author 李力
 * @description 针对表【account(用户财产记录)】的数据库操作Service
 * @createDate 2025-06-12 10:12:52
 */
public interface AccountService extends IService<Account> {


    Boolean transferAccountAmount(Long adminId, Long userId, Long coinId, Long orderNum, BigDecimal num, BigDecimal fee, String remark, String businessType, Byte direction);

    Account findByUserAndCoin(Long userId, String gcn);

    void lockUserAmount(Long userId, Long coinId, BigDecimal mum, String withdrawalsOut, Long id, BigDecimal fee);

    Boolean decreaseAccountAmount(Long adminId, Long userId, Long coinId, Long orderNum, BigDecimal num, BigDecimal fee, String remark, String businessType, byte direction);

    UserTotalAccountVo getTotal(Long userId);
}
